package com.hqyj.emb.system.controller;

import com.hqyj.emb.system.model.Role;
import com.hqyj.emb.system.model.User;
import com.hqyj.emb.system.service.EmailService;
import frame.controller.BaseController2;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

@WebServlet("/emailController.do")
public class EmailController extends BaseController2 {

    public String list(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        List<Role> roles = roleService.queryAllUserRoleName();
        System.out.println(roles);
        req.setAttribute("roles",roles);
        return "view/system/email/addEmail.jsp";
    }

}
